package ink.tiptop.convert;

import ink.tiptop.pojo.Car;
import ink.tiptop.pojo.CarDto;
import ink.tiptop.factory.DtoFactory;
import ink.tiptop.factory.EntityFactory;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @author zjf
 * @date 2020-08-15 15:54
 * 自定义对象工厂,生成对象方法和转换方式
 */
@Mapper(uses = {DtoFactory.class, EntityFactory.class})
public interface Z_CustomFactoryConvert {

    Z_CustomFactoryConvert INSTANCE = Mappers.getMapper( Z_CustomFactoryConvert.class );

    CarDto carToCarDto(Car car);

    Car carDtoToCar(CarDto carDto);
}
